public class Day4 {
    public static void main(String[] args) {
//        int min = Math.min({1,2,3});
    }
    public static String reverseLeftWords(String s, int n) {
        n = n % s.length();
        //StringBuilder str = new StringBuilder();
        s +=s;

        //String str = s.subString(n,n+s.length());
        String str = s.substring(n,n+s.length()/2);
        return str;
    }

    public static void main2(String[] args) {
        System.out.println(reverseLeftWords("abcdefg", 2));
    }
    public static void main1(String[] args) {
        String s = "1 2 3 4 5 6";
        String[] str = s.split(" ");
        StringBuffer str2 = new StringBuffer();
        System.out.println(s.substring(1, 5));
    }
}
